package com.ease.platform.model.type;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.OptionalEnum;

/**
 * 
 * @author nathanleewei
 * 
 */
public enum OperationLogType implements OptionalEnum {

	CREATE((short) 1, "CREATE"),

	UPDATE((short) 2, "UPDATE"),

	REMOVE((short) 3, "REMOVE");

	private short value;

	private String text;

	private OperationLogType(short value, String text) {
		this.value = value;
		this.text = text;
	}

	public static OperationLogType get(short value) {
		return EnumUtil.get(OperationLogType.class, value, CREATE);
	}

	public static OperationLogType get(String name) {
		return EnumUtil.get(OperationLogType.class, name, CREATE);
	}

	public String getText() {
		return text;
	}

	public String getName() {
		return name();
	}

	public short getValue() {
		return value;
	}

}
